package com.shigen.demo.entity.req;

import com.shigen.demo.bean.PageRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

public class UserInfoReq {

  @Data
  @EqualsAndHashCode(callSuper = true)
  @ApiModel(value = "分页查询")
  public static class QueryItem extends PageRequest {

    @ApiModelProperty(value = "参数为用户id或者用户名")
    private String param;
  }

  @Data
  @ApiModel(value = "基础信息的封装")
  public static class OpBase {

    private Integer userId;

    @NotEmpty(message = "用户名不能为空")
    private String userName;

    private Boolean sex;

    @NotNull(message = "生日不能为空")
    private String birthday;

    @NotEmpty(message = "电话号码不能为空")
    private String phone;

    @Email(message = "邮箱格式错误")
    private String email;

    @NotEmpty(message = "籍贯不能空")
    private String region;

    private String address;

    private Boolean isActive;

    private Boolean isDel;
  }

  @ApiModel(value = "批量删除用户")
  @Data
  public static class DelBatch {
    @ApiModelProperty(value = "批量删除的用户id")
    @NotEmpty(message = "用户的id不能为空")
    private List<Long> userIds;
  }
}
